package com.example.icedcap.topeka_fake.model.quiz;

import android.os.Parcel;

/**
 * Author: doushuqi
 * Date: 15/7/15
 * Time: 上午11:12
 * Email: shuqi.dou@singuloid.com
 */
public final class FillBlankQuiz extends Quiz<String> {
    private final String mStart, mEnd;

    public FillBlankQuiz(String question, String answer, boolean solved, String start, String end) {
        super(question, answer, solved);
        mStart = start;
        mEnd = end;
    }

    protected FillBlankQuiz(Parcel in) {
        super(in);
        setAnswer(in.readString());
        mStart = in.readString();
        mEnd = in.readString();
    }

    @Override
    public QuizType getQuizType() {
        return QuizType.FILL_BLANK;
    }

    @Override
    public String getStringAnswer() {
        return getAnswer();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(getAnswer());
        dest.writeString(mStart);
        dest.writeString(mEnd);
    }

    public String getStart() {
        return mStart;
    }

    public String getEnd() {
        return mEnd;
    }

    @Override
    public boolean equals(Object o) {
        return super.equals(o);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}
